package net.vinote.smart.platform.service.dw.handler;

import java.sql.SQLException;
import java.util.List;

import net.vinote.smart.platform.module.database.DBTransaction;
import net.vinote.smart.platform.module.database.bo.BizObject;
import net.vinote.smart.platform.service.util.Permission;
import net.vinote.smart.platform.service.util.Permission.PermissionEnum;
import net.vinote.smart.platform.service.util.Permission.PermissionRelation;

/**
 * 虚拟显示模板Handler，屏蔽增删改操作方法
 * 
 * @author Seer
 * @version VirtualCommonHandler.java, v 0.1 2015年3月11日 下午2:28:21 Seer Exp.
 */
@HandlerPerimissionAnnotation(
		virtual = @Permission(
				value = PermissionEnum.SMART_DISABLE,
				PermissionRelation = PermissionRelation.NOT))
public class VirtualCommonHandler extends CommonHandler {

	public List<BizObject> initDataList() {
		return null;
	}

	public int initDataCount() {
		return 0;
	}

	public void initDisplayForVirtual(BizObject bo) {
	}

	/**
	 * 虚拟显示模板处理方法
	 * 
	 * @param bo
	 * @throws Exception
	 */
	public void doVirtual(BizObject bo) throws Exception {

	}

	@Override
	public final void initDisplayForEdit(BizObject bo) {
		throw new UnsupportedOperationException();
	}

	@Override
	public final void initDisplayForAdd(BizObject bo) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final boolean validityCheck(BizObject bo, boolean isInsert) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void beforeInsert(BizObject bo, DBTransaction tx) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void afterInsert(BizObject bo, DBTransaction tx) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void beforeUpdate(BizObject bo, DBTransaction tx) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void afterUpdate(BizObject bo, DBTransaction tx) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void beforeDelete(BizObject bo, DBTransaction tx)
			throws SQLException {
		throw new UnsupportedOperationException();
	}

	@Override
	protected final void afterDelete(BizObject bo, DBTransaction tx)
			throws SQLException {
		throw new UnsupportedOperationException();
	}

}
